package com.hutool.clone;

import cn.hutool.core.clone.Cloneable;

/**
 * @author 航
 * @date 2024/08/16 21:18
 **/
public class Cat implements Cloneable<Cat> {

    private String name = "miaomiao";
    private int age = 2;

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public Cat clone() {
        try {
            return (Cat)super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
    }
}

